package com.sylli.oeuf.server.game.logic;

public abstract class PassiveSkill extends Skill implements EventParameter {
	
	protected int ttl;
	
	protected int maxTtl;
	
	public PassiveSkill(String name, int maxTtl) {
		super(name, CastingTarget.Self);
		this.maxTtl = maxTtl;
		this.ttl = maxTtl;
	}

	public int getTtl() {
		return ttl;
	}

	public void setTtl(int ttl) {
		this.ttl = ttl;
	}
	
	public void decay() {
		ttl --;
	}
	
	public boolean isDepleted() {
		return ttl == 0;
	}

}
